package me.zhengjie.modules.system.domain.vo

import cn.hutool.core.bean.BeanUtil
import cn.hutool.core.bean.copier.CopyOptions
import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.annotation.JsonTypeName
import me.zhengjie.common.utils.JacksonUtil
import me.zhengjie.modules.system.service.dto.DictDTO
import org.apache.commons.lang3.builder.ToStringBuilder


/**
 * 构建前端路由时用到
 * @author Kuki Wu
 * @date 2018-12-20
 */

@JsonTypeName("MenuVo")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
data class MenuVo(
    var name: String? = null,
    var path: String? = null,
    var hidden: Boolean? = null,
    var redirect: String? = null,
    var component: String? = null,
    var alwaysShow: Boolean? = null,
    var meta: MenuMetaVo? = null,
    var children: List<MenuVo>? = null
){
    annotation class Update

    fun copy(source: MenuVo?) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true))
    }
}